package com.cloudlead.commonData.query;

import static com.mysema.query.types.PathMetadataFactory.*;
import com.cloudlead.commonData.entity.ERegion;


import com.mysema.query.types.path.*;

import com.mysema.query.types.PathMetadata;
import javax.annotation.Generated;
import com.mysema.query.types.Path;

import com.mysema.query.sql.ColumnMetadata;
import java.sql.Types;

import com.mysema.query.sql.*;

import com.cloudlead.common.lang.annotation.Label;


/**
 * QRegion is a Querydsl query type for ERegion
 */
@Label("全国行政区划查询")
@Generated("com.cloudlead.utils.persistence.codegen.serializer.SimpleMetaDataSerializer")
public class QRegion extends RelationalPathBase<ERegion> {

    private static final long serialVersionUID = 929968349;

    public static final QRegion region = new QRegion("region");

    public class PrimaryKeys {

        public final PrimaryKey<ERegion> primary = createPrimaryKey(id);

    }

    public class ForeignKeys {

        public final ForeignKey<com.cloudlead.commonData.entity.ETbPlacePrice> _tbPlacePriceBasePlace1Fk = createInvForeignKey(id, "base_ place_id");

        public final ForeignKey<com.cloudlead.commonData.entity.EBaseDoor> _regionIdFk = createInvForeignKey(id, "base_ place_id");

        public final ForeignKey<com.cloudlead.commonData.entity.ETbPlacePrice> _tbDoor5Fk = createInvForeignKey(id, "door5");

        public final ForeignKey<com.cloudlead.commonData.entity.ETbCustomerOrder> _sDoor = createInvForeignKey(id, "sDoor");

        public final ForeignKey<com.cloudlead.commonData.entity.EBaseDock> _baseDockBaseCity1Fk = createInvForeignKey(id, "base_city_id");

        public final ForeignKey<com.cloudlead.commonData.entity.ETbCustomerOrder> _fDoor = createInvForeignKey(id, "fDoor");

    }

    public final BooleanPath available = createBoolean("available");

    public final NumberPath<Integer> code = createNumber("code", Integer.class);

    public final StringPath id = createString("id");

    public final NumberPath<Integer> level = createNumber("level", Integer.class);

    public final StringPath name = createString("name");

    public final NumberPath<Integer> parentCode = createNumber("parentCode", Integer.class);

    public final PrimaryKeys pk = new PrimaryKeys();

    public final ForeignKeys fk = new ForeignKeys();

    public QRegion(String variable) {
        super(ERegion.class, forVariable(variable), "null", "region");
        addMetadata();
    }

    public QRegion(String variable, String schema, String table) {
        super(ERegion.class, forVariable(variable), schema, table);
        addMetadata();
    }

    public QRegion(Path<? extends ERegion> path) {
        super(path.getType(), path.getMetadata(), "null", "region");
        addMetadata();
    }

    public QRegion(PathMetadata<?> metadata) {
        super(ERegion.class, metadata, "null", "region");
        addMetadata();
    }

    public void addMetadata() {
        addMetadata(available, ColumnMetadata.named("available").withIndex(6).ofType(Types.BIT).notNull());
        addMetadata(code, ColumnMetadata.named("code").withIndex(2).ofType(Types.INTEGER).withSize(10).notNull());
        addMetadata(id, ColumnMetadata.named("id").withIndex(1).ofType(Types.CHAR).withSize(24).notNull());
        addMetadata(level, ColumnMetadata.named("level").withIndex(5).ofType(Types.INTEGER).withSize(10).notNull());
        addMetadata(name, ColumnMetadata.named("name").withIndex(4).ofType(Types.VARCHAR).withSize(50).notNull());
        addMetadata(parentCode, ColumnMetadata.named("parent_code").withIndex(3).ofType(Types.INTEGER).withSize(10));
    }

}

